FROM openjdk:alpine

COPY /target/*.jar /maven/

# set debug=true to get spring boot debug-level logging
ENV debug=false
# set REMOTE_DEBUG=true to enable connections to remote debug port
ENV REMOTE_DEBUG=false

EXPOSE 8085

CMD if [ "x$REMOTE_DEBUG" = "xfalse" ] ; then java $JAVA_OPTS -jar maven/*.jar ; else java $JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -jar maven/*.jar ; fi
